<?php
/**
 * Created by PhpStorm.
 * User: alinejun
 * Date: 2019/1/7
 * Time: 23:08
 */
namespace app\common\validate;
class Order extends ValidateBase
{

    // 验证规则
    protected $rule = [
        'goods_id'  => 'require',
        'address_id'  => 'require',
    ];

    // 验证提示
    protected $message = [
        'goods_id.require'    => '商品id',
        'address_id.length'     => '地址id',
    ];

    // 应用场景
    protected $scene = [
        'add'  =>  ['goods_id','address_id'],
    ];
}